home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / Think Class Libraries / Item Class / Item headers / CDragDropTableTask.h next >
Encoding:
C/C++ Source or Header  |  1994-11-30  |  1.3 KB  |  54 lines  |  [TEXT/KAHL]

  1. /*
  2.  * File:        CDragDropTableTask.h
  3.  * Created:        8/1/93
  4.  * Desc:        A mousetask that handles dragging and dropping
  5.  *                in CItemTable.
  6.  *
  7.  * Superclass:    CTableDragger.
  8.  * Uses:        CItemTable, CItem.
  9.  * Original Author:    W. Wesley Monroe
  10.  * Modifications:    
  11.  *
  12.  * Copyright © 1993 Animas Software Production. All rights reserved.
  13.  */
  14.  
  15. #include <CTableDragger.h>
  16.  
  17. class CItem;
  18. class CItemList;
  19.  
  20. enum {
  21.     kKeepNone,                    // works like finder...
  22.     kAlwaysKeepOneRoot,            // Always keep one root non-expandable item...
  23.     kRemoveDifferentTargetView    // Remove from the original list only if
  24.                                 // dropped in a different target...
  25. };
  26.  
  27. class CDragDropTableTask : public CTableDragger {
  28.  
  29. protected:
  30.  
  31.     CItemList    *fSelectedItems;
  32.     CView        *fEnclosingPano;
  33.     CView        *fReleasedView, *fOriginalView;
  34.  
  35.     short    fCanDragDrop;
  36.     RgnHandle    fGrayRgn;
  37.     Cell        fDropTargetCell;
  38.     Boolean        fGRDrawn;
  39.     Boolean        fFirst;
  40.     Boolean        fDropFlags;
  41.     Boolean        fDropTarget;        // is there a drop target?
  42.  
  43. public:
  44.  
  45.     void IDragDropTableTask(CTable *aTable, CView *dragBoundsView,
  46.                             short theModifiers,
  47.                             long selFlags);
  48.  
  49.     virtual void BeginTracking(LongPt *startPt);
  50.     virtual void KeepTracking(LongPt *currPt, LongPt *prevPt, LongPt *startPt);
  51.     virtual void EndTracking(LongPt *currPt, LongPt *prevPt, LongPt *startPt);
  52.  
  53.     virtual void Dispose(void);
  54. };